Repository navigation
fix(core-ts): allow the collection index page at a permalink prefix - #119
Merged
Merged
Conversation
set_collection_permalink refused /blog/{slug} while a page lived at
/blog, the collection's listing page. Only pages strictly under a
configured prefix conflict now, in checkPermalinks, its SQL guard
(noPageUnder) and the reverse page-write check (checkPagePath,
configuredPrefixFree "under"). RFC-0038 "Overlaps" and invariant 1
say so.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Madraka <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
set_collection_permalinkwithposts→/blog/{slug}failed withpath_conflict: collection "posts" at /blog would cover page /blog, although/blogis only the listing page and entries live at/blog/<slug>. RFC-0038 keeps the collection index page a page the owner creates, so a page at a configured prefix is now allowed and only pages strictly under it conflict:checkPermalinksusespathUnder(waspathWithin, which was also true for equal paths).noPageUnder(wasnoPageWithin).checkPagePath,pageGuard→configuredPrefixFree(…, "under")) lets a page sit at the prefix.Once released, cloudhal.com's
postscan move to/blog/{slug}. Studio's "Create listing page" now also works for a collection with its own permalink.Tests: the core-ts permalink suite (sqlite, D1, DO SQLite) gains "the page at a template's prefix is the collection's index page", in both orders (page first, template first), with the SQL guards in the batch. The MCP, API and Studio tests that used a page at the prefix as their conflict now use one under it.
Checklist
pnpm checkpasses locally (see below);cargo testnot needed (no contract or Rust change)@cloudhal/core-tspatch)Verified on a local merge of all three gap PRs (fix/collection-index-page, fix/theme-scripts-csp, fix/body-blocks-and-tools; they merge cleanly): Biome, size check, font-fallback and MCP-doc checks, every typecheck, and every package test suite pass, including
@cloudhal/cli(45 files, Chrome render tests included). One exception, not from this change: 35 tests incore-tsstore.test.tson the "Durable Object SQLite (Miniflare)" backend fail withconnect EADDRNOTAVAIL(local port exhaustion).mainfails the same 35 tests on this machine. No Rust or contract change, socargo testwas not run. GitHub Actions runners do not start (billing), so CI red is environmental.🤖 Generated with Claude Code